fill python list with input

48

fill python list with input -

lst = [ ] 
n = int(input("Enter number of elements : ")) 
  
for i in range(0, n): 
    ele = input()
    lst.append(ele) 
      
print(lst)

# this will add a specified amount of strings to the list (lst) 

Comments

Submit
0 Comments